<template>
    <view>
        <div style="padding: 15px;" v-if="sysConfig">
            <u-collapse :accordion="false">
                <u-collapse-item :title="accordionPanel['header']" v-for="(accordionPanel, index) in sysConfig.accordionPanelList" :key="index">
                    <div style="margin-bottom: 5px;" v-for="(item, innerIndex) in accordionPanel['list']" :key="innerIndex">
                        <div v-html="item"></div>
                    </div>
                </u-collapse-item>
            </u-collapse>
        </div>
    </view>
</template>

<script>

    import {SysConfigService} from "@/dev/services/sys-config.service";

    export default {
        data() {
            return {
                sysConfig: null
            }
        },
        onReady() {
            const _self = this;
            new SysConfigService().findSysConfig({
                code: '开店指引',
                status: '1',
                deleted: false
            }).then(result => {
                _self.sysConfig = result;
                _self.sysConfig.accordionPanelList = JSON.parse(_self.sysConfig.remark);
                _self.sysConfig.activeKey = [];
                _self.sysConfig.accordionPanelList.forEach((item, index) => {
                    if (item.isActive) {
                        _self.sysConfig.activeKey.push(index);
                    }
                });
            });
        },
        methods: {}
    }
</script>

<style lang="scss" scoped>
</style>
